package zengqiang.day03

fun main(args: Array<String>) {

}

/**
 * kotlin中类默认是私有final的，需要添加open才能继承
 */
open class Father{
    open var name="张三"
    open var age=11
    open fun test(){
        println("父亲")
    }
}


class Son: Father() {
    override var name="张四"
    override var age=10
    override fun test() {
        println("儿子")
    }
}